import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/modules/home/Home'
import About from '@/modules/about'
import ArticleList from '@/modules/articleList'
import Message from '@/modules/message'
import Login from '@/modules/login'
import Register from '@/modules/register'

Vue.use(Router)

export default new Router({
  routes: [{
    path: '/',
    name: 'Home',
    component: Home,
    redirect: '/articleList',
    children: [{
      path: '/about',
      name: 'About',
      component: About
    }, {
      path: '/articleList',
      name: 'ArticleList',
      component: ArticleList
    }, {
      path: '/message',
      name: 'Message',
      component: Message
    }]
  }, {
    path: '/login',
    name: 'Login',
    component: Login
  }, {
    path: '/register',
    name: 'Register',
    component: Register
  }]
})
